<?php

namespace App\Containers\AppSection\Project\Actions;

use App\Containers\AppSection\Project\Tasks\GetProjectsTask;
use App\Ship\Parents\Actions\Action;
use App\Ship\Parents\Requests\Request;

class GetProjectsAction extends Action
{
    public function run(Request $request)
    {
        return app(GetProjectsTask::class)
            ->addRequestCriteria()
            ->notDrafted()
            ->filterByStatus($request->getInputByKey('status'))
            ->run();
    }
}
